<template>
  <div>
    <h2>我是count组件</h2>
    <button @click="changeCount(3)">累加父组件给我的count</button>
    <button @click="add">查看组件的实例</button>
    <p >子组件展示prop{{ count }}</p>
  </div>
</template>

<script>
export default {
  name: "Count",
  data() {
    return {
      count1:this.count,
    };
  },
  props:["count","changeCount"],
  methods:{
    add(){
      console.log(this);
      console.log(this.count);
      console.log(this.$props.count);
    }
  }
};
</script>

<style></style>
